package org.example.day;

import java.util.Arrays;

/**
 * @Description: TODO
 * @Author wyatt
 * @Data 2024/07/26 18:11
 */
public class Solution2740 {

    public int findValueOfPartition(int[] nums) {
        Arrays.sort(nums);
        int dis = Integer.MAX_VALUE;
        for (int i = 0; i < nums.length-1; i++) {
            dis = Math.min(dis, nums[i+1] - nums[i]);
            if(dis == 0){
                break;
            }
        }
        return dis;
    }
}
